﻿/* Copyright 2010 Igor Francé
 * 
 * This file is part of ECMADoc (http://ecmadoc.codeplex.com).
 * 
 * ECMADoc is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * ECMADoc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with ECMADoc. 
 * If not, see http://www.gnu.org/licenses/.
 */
namespace EcmaDoc.Core.Configuration
{
	using System;
	using System.Collections.Specialized;

	/// <summary>
	/// Encapsulates the token match data.
	/// </summary>
	public class TokenMatch
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="TokenMatch"/> class.
		/// </summary>
		/// <param name="name">The name of the token that was matched.</param>
		/// <param name="value">The value of the token that was matched.</param>
		public TokenMatch(string name, string value)
		{
			this.Name = name;
			this.Value = value;
			this.Data = new NameValueCollection();
		}

		/// <summary>
		/// Gets the name of the token that was matched.
		/// </summary>
		public string Name { get; private set; }

		/// <summary>
		/// Gets the value of the token that was matched.
		/// </summary>
		public string Value { get; private set; }

		/// <summary>
		/// Gets the name/value collection of submatch names and values.
		/// </summary>
		public NameValueCollection Data { get; private set; }
	}
}
